/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bsc.ejb.entity;

import bsc.ejb.metadata.Colorimetry;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author memozac
 */
@Entity
public class ColorimetrySettings implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idColorimetrySettings;

    @ManyToOne
    @JoinColumn(name="idSettings",nullable=false,updatable=true)
    private Settings settings;

    @ManyToOne
    @JoinColumn(name="idColorimetry",nullable=false,updatable=true)
    private Colorimetry colorimetry;

    private Double maxScore; // <=
    private Double minScore; // >

    public Double getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(Double maxScore) {
        this.maxScore = maxScore;
    }

    public Double getMinScore() {
        return minScore;
    }

    public void setMinScore(Double minScore) {
        this.minScore = minScore;
    }

    public Colorimetry getColorimetry() {
        return colorimetry;
    }

    public void setColorimetry(Colorimetry colorimetry) {
        this.colorimetry = colorimetry;
    }

    public Long getIdColorimetrySettings() {
        return idColorimetrySettings;
    }

    public void setIdColorimetrySettings(Long idColorimetrySettings) {
        this.idColorimetrySettings = idColorimetrySettings;
    }

    public Settings getSettings() {
        return settings;
    }

    public void setSettings(Settings settings) {
        this.settings = settings;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idColorimetrySettings != null ? idColorimetrySettings.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof ColorimetrySettings)) {
            return false;
        }
        ColorimetrySettings other = (ColorimetrySettings) object;
        if ((this.idColorimetrySettings == null && other.idColorimetrySettings != null) || (this.idColorimetrySettings != null && !this.idColorimetrySettings.equals(other.idColorimetrySettings))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bsc.ejb.entity.ColorimetrySettings[id=" + idColorimetrySettings + "]";
    }

}//ends of class